Skip to content

Reuse stored projectors in AtomicNonlocal forces#1101

Closed
abussy wants to merge 5 commits intoJuliaMolSim:masterfrom
abussy:nonlocal
Closed

Reuse stored projectors in AtomicNonlocal forces#1101
abussy wants to merge 5 commits intoJuliaMolSim:masterfrom
abussy:nonlocal

Conversation

@abussy
Copy link
Collaborator

@abussy abussy commented May 22, 2025

During the calculation of the AtomicNonlocal forces, the projectors are recomputed for each element and k-point. There is no good reason to do that since they are already stored in the TermAtomicNonlocal.

This mostly impacts GPU performance, as relatively slow CPU loops over G + k vectors are avoided. This PR might collide with #1088.

@mfherbst
Copy link
Member

Yes, sure, makes sense to re-use what we already computed.

@Technici4n Any problems with merging this before #1088 ?

@Technici4n
Copy link
Collaborator

It will be a bit of work to update #1088 after this, but conceptually this change makes sense, and I don't know when I will be done with #1088. So go for it!

@antoine-levitt
Copy link
Member

Yes sure sounds good!

@abussy
Copy link
Collaborator Author

abussy commented Feb 23, 2026

I'll close this PR for now, I will implement these changes in a new contribution where I optimize the AtomicNonlocal term more widely.

@abussy abussy closed this Feb 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants